cmake_minimum_required(VERSION 3.10)

project(YuAPP VERSION 1.1)

# VS对  QTCreator错误
# add_compile_options(-finput-charset=GBK) #修改GBK编码格式在GCC中输出中文乱码

# 限制构建类型为 Debug 和 Release
set(CMAKE_CONFIGURATION_TYPES "Debug;Release")

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 定义根目录
set(SRC_ROOT_DIR ${CMAKE_SOURCE_DIR})
set(OUT_ROOT_DIR ${CMAKE_BINARY_DIR})
# message(${OUT_ROOT_DIR})

# 折叠 ZERO_CHECK 等
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(PREDEFINED_TARGETS_FOLDER "CustomTargets") # 折叠到默认目录
# set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "_CMakePredefinedTargets") # 折叠到指定目录

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(EXECUABLE_OUTPUT_PATH ${OUT_ROOT_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUT_ROOT_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUT_ROOT_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUT_ROOT_DIR}/lib)

add_subdirectory(app)
#add_subdirectory(tests)
add_subdirectory(service)

